<%--
  Created by IntelliJ IDEA.
  User: haol
  Date: 2017/8/31
  Time: 16:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<base href="<%=basePath%>">
<html lang="zn-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="format-detection" content="telephone=no"/>
    <title>小程序</title>
    <link rel="stylesheet" href="css/base.css?v=201709071500">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/base.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/handle.js"></script>
    <script type="text/javascript" src="js/mall_lhx.js"></script>
    <style>
        .wrap {
            overflow: hidden;
            padding-bottom: 0px;
        }
        .hiSlider {
            overflow: hidden;
            width: 500px;
            max-height: 262px;
            /*min-height: 150px;*/
            background: #fff;
        }
        .hiSlider-item {
            float: left;
            width: 100%;
            max-height: 100%;
        }
    </style>
    <link rel="stylesheet" href="js/libs/hiSlider/jquery.hiSlider.css">
    <script type="text/javascript" src="js/libs/hiSlider/jquery.hiSlider.js"></script>
    <script type="text/javascript" src="js/ask.js"></script>
</head>
<body class="ed" style = "position:relative">
<div class="wrap" >
    <div class="banner">
        <ul class="hiSlider" id="detailPicSlider"></ul>
    </div>
    <h3 class="detail_title">
        <i id="detaiTitle">MobileGroup_MiniProgram</i>
    </h3>
    <div class="detail_content">
        <h4 class="detail_subtitle"> <i></i>
            长按识别二维码体验小程序
        </h4>
        <p class="detail_text" id="productDetail"></p>
    </div>
</div>
<script type="text/javascript">
    var result = {
        "respCode": "00",
        "object": {
            "id": "213583",
            "issuer": "手机群录小程序码",
            "name": "扫描二维码体验",
            "description": "",
            "orgPrice": "1",
            "price": "1",
            "createTime": "20170719201622",
            "brand": "dcvadvav",
            "deleted": "0",
            "picture": "http://111.231.253.134/static/common/img/share_log.png;http://111.231.253.134/static/common/img/share_log2.png",
            "updated": "0",
            "lastUpDateTime": "20170831171426"
        },
        "msg": "success"
    };
    $(function () {
        drawProductDetail(result);
        $('#detailPicSlider').hiSlider({
            isFlexible: true, // 宽度自适应
            isShowControls: false, //是否显示分页按钮
            isAuto: false, //是否自动播放
            isShowTitle: false //是否显示标题栏
        });
    })
    function drawProductDetail(r) {
        var res = r.object;
        if (res.deleted == 1) {
            $(".wrap").addClass('none');
            $(".mall_nodata").removeClass('none');
            return;
        }
        var picArray = res.picture.replace(/\s/, '').split(";");
        var detailArray = res.description.replace(/ /, '').split(";");
        var objp = getParameter("hiSlider");
        if (objp != "") {
            picArray = objp.picture;
            detailArray = objp.description;
        }
        detailArray.push($.httpStaticPath()+"common/img/qr/appQr_mini_12.jpg");
        // 轮播图
        for (var i = 0; i < picArray.length; i++) {
            var p2 = "<li class='hiSlider-item'>";
            p2 += "<img src='" + picArray[i] + "'></li>";
            $("#detailPicSlider").append(p2);
        }
        // 详情图
        for (var j = 0; j < detailArray.length; j++) {
            var p3 = "<img src='" + detailArray[j] + "'>";
            $("#productDetail").append(p3);
        }

    }
</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript" src="js/weixin.js"></script>
<script type="text/javascript">
    getSignature(['onMenuShareTimeline','onMenuShareAppMessage'],function () {
        shareMobileGroup("${fromUser}");
    })
</script>
</body>
</html>